CC = gcc
CFLAGS = -m32 -Os -nostdlib -fno-builtin

OBJ = multiboot.o bootentry.o logo.o console.o

xinix:$(OBJ)
	$(CC) $(CFLAGS) -e BootEntry -Ttext 0x10000 -o xinix $(OBJ)
	
bootentry.o:boot/bootentry.s
	$(CC) $(CFLAGS) -c -o bootentry.o boot/bootentry.s
multiboot.o:boot/multiboot.c
	$(CC) $(CFLAGS) -c -o multiboot.o boot/multiboot.c

logo.o:kernel/logo.c
	$(CC) $(CFLAGS) -c -o logo.o kernel/logo.c

console.o:drive/console.c
	$(CC) $(CFLAGS) -c -o console.o drive/console.c

clean:
	rm $(OBJ)